import axios from 'axios'
import { getToken } from '../utils/auth'

const headers = {
  'Content-Type': 'application/json',
  'cpd_session_id': getToken()
}
// 用户列表
export const exportCustomerExcel = data => axios({
  url: `/defi/export/user`,
  method: 'post',
  responseType: 'arraybuffer',
  data: JSON.stringify(data),
  headers
})
export const exportOrderExcel = data => axios({
  url: `/defi/export/order`,
  method: 'post',
  responseType: 'arraybuffer',
  data: JSON.stringify(data),
  headers
})
export const exportIncomeExcel = data => axios({
  url: `/defi/export/income`,
  method: 'post',
  responseType: 'arraybuffer',
  data: JSON.stringify(data),
  headers
})
export const exportuserAsset = data => axios({
  url: `/eop/admin/wallet/userAsset/export`,
  method: 'post',
  responseType: 'arraybuffer',
  data: JSON.stringify(data),
  headers
})
// 充值记录
export const exportdeductOfSupply = data => axios({
  url: `/eop/admin/wallet/recharge/export`,
  method: 'post',
  responseType: 'arraybuffer',
  data: JSON.stringify(data),
  headers
})
// 划扣不发
export const exportwalletdeductOfSupply = data => axios({
  url: `/eop/admin/wallet/deductOfSupply/export`,
  method: 'post',
  responseType: 'arraybuffer',
  data: JSON.stringify(data),
  headers
})

// 转赠记录
export const exportdonateexport = data => axios({
  url: `/eop/admin/wallet/donate/export`,
  method: 'post',
  responseType: 'arraybuffer',
  data: JSON.stringify(data),
  headers
})
// 转换积分记录
export const exportwalletintegralexport = data => axios({
  url: `/eop/admin/wallet/integral/export`,
  method: 'post',
  responseType: 'arraybuffer',
  data: JSON.stringify(data),
  headers
})

// 导出订单列表
export const exportorderExcel = data => axios({
  url: `/eop/admin/order/Excel`,
  method: 'post',
  responseType: 'arraybuffer',
  data: JSON.stringify(data),
  headers
})
// 导出平台流水记录
export const exporwalletflowExcel = data => axios({
  url: `/eop/admin/wallet/flow/export`,
  method: 'post',
  responseType: 'arraybuffer',
  data: JSON.stringify(data),
  headers
})
// 导出股东收益
export const exporshareholderExcel = data => axios({
  url: `/eop/admin/wallet/shareholder/export`,
  method: 'post',
  responseType: 'arraybuffer',
  data: JSON.stringify(data),
  headers
})
